package com.zzty.txj1.service.impl;

import com.zzty.txj1.dao.TeanExamMapper;
import com.zzty.txj1.entity.Group;
import com.zzty.txj1.entity.TeamExam;
import com.zzty.txj1.entity.TeamExamTransaction;
import com.zzty.txj1.service.LookTeamExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LookTeamExamServiceImpl implements LookTeamExamService {
    @Autowired
    TeanExamMapper teanExamMapper;
    @Override
    public Integer getId(TeamExam teamExam){
        System.out.println("team"+teamExam.toString());
        Integer id=teanExamMapper.getId(teamExam);
        return id;
    }
    @Override
    public List<Integer> getGroupId(Integer id){
        List<Integer>getGroupId=teanExamMapper.getGroupId(id);
        return getGroupId;
    }
    @Override
    public Group getGroupName(Integer id){
        System.out.println("id"+id);
        Group group=teanExamMapper.getGroupName(id);
        System.out.println("groupservice"+group.toString());
        return group;
    }
    @Override
    public TeamExamTransaction getinfo(TeamExamTransaction teamExamTransaction){
        TeamExamTransaction teamExamTransaction1=teanExamMapper.getinfo(teamExamTransaction);
        return teamExamTransaction1;
    }

    @Override
    public Integer updateTeamExamTransaction(TeamExamTransaction teamExamTransaction){
        Integer count=teanExamMapper.updateTeamExamTransaction(teamExamTransaction);
        return count;
    }
    @Override
    public Integer getUserId(String name){
        Integer id=teanExamMapper.getUserId(name);
        return id;
    }
    @Override
    public Integer updateTeamExam(TeamExam teamExam){
        Integer count=teanExamMapper.updateTeamExam(teamExam);
        return count;
    }
}
